package com.itheima;

import com.itheima.config.SpringConfig;
import com.itheima.service.AccountService;
import com.itheima.service.LogService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.Date;

/**
 * @author 刘全
 * @date 2021/9/13
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {SpringConfig.class}) //加载配置类
public class App {

    @Autowired
    private LogService logService;
    @Autowired
    private AccountService accountService;
    @Test
    public void test() {
        accountService.change("张三","李四",50.0);
    }
    @Test
    public  void test2() {
        Date date = new Date();
        logService.save(date,"转账成功");
    }
}
